<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        .container {
            width: 400px;
            height: 400px;
            position: absolute;
            animation: move 2s ease-out infinite;
        }

        .pair {
            width: 400px;
            height: 200px;
            display: flex;
            justify-content: space-around;
            align-items: center;
        }

        .left,
        .right {
            width: 100px;
            height: 100px;
            border: 1px solid rgb(230, 214, 187);
            border-radius: 100px;
            position: relative;
            background-color: antiquewhite;
        }

        .left::after,
        .right::after {
            content: '🥚';
            width: 20px;
            height: 20px;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }

        @keyframes move {
            0% {
                transform: translateY(0px);
            }

            50% {
                transform: translateY(50px);
            }

            100% {
                transform: translateY(0px);
            }
        }
    </style>
</head>

<body>
    <!-- https://code.juejin.cn/pen/7085512184461000743 -->

    <div class="container">
        <div class="pair">
            <div class="left"></div>
            <div class="right"></div>
        </div>

    </div>
</body>

</html>